package com.leonzx.base.controller.job;

import com.leonzx.base.controller.base.BaseController;
import com.leonzx.base.entity.system.JobAndTrigger;
import com.leonzx.base.service.system.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:梁亮
 * @Description:
 * @Date: 2018/7/2 17:27
 */
@Controller
@RequestMapping("/system/job")
public class JobController extends BaseController {

    @Autowired
    private JobService jobService;

    @RequestMapping("/list")
    public String list() {
        return "system/job/list";
    }

    @RequestMapping("/add")
    public String add(Model model) {
        model.addAttribute("jobAndTrigger", new JobAndTrigger());
        return "system/job/edit";
    }

    @RequestMapping("/edit")
    public String edit(JobAndTrigger jobAndTrigger, Model model) {
        model.addAttribute("jobAndTrigger", jobAndTrigger);
        return "system/job/edit";
    }
}
